import { AnyObject } from "./interface.ts";

export function clone<T>(params: T[]): T[];
export function clone(params: AnyObject): AnyObject;
export function clone<T>(params: Array<T> | AnyObject) {
  if (params instanceof Array) {
    return params.slice();
  }
  return { ...params } as T;
}
